﻿using Project.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.DTO
{
    /// <summary>
    /// 用户注册
    /// </summary>
    public class UserPost
    {
        [StringLength(maximumLength: 20, ErrorMessage = "用户名过长")]
        [Display(Name = "用户名")]
        public string Name { get; set; }

        [Required(ErrorMessage = "{0}必填")]
        [StringLength(64)]
        [Display(Name = "密码")]
        public string LoginPwd { get; set; }

        [StringLength(20)]
        [Display(Name = "手机号")]
        [Required(ErrorMessage = "{0}必填")]
        public string Phone { get; set; }

        [StringLength(5)]
        [Display(Name = "性别")]
        public string Sex { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [StringLength(100)]
        [Display(Name ="头像")]
        public string Image { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        [StringLength(50)]
        [Display(Name ="地址")]
        public string Address { get; set; }

        /// <summary>
        /// 用户类型 1：雇员  2：雇主
        /// </summary>
        public int UserType { get; set; } = 1;

        /// <summary>
        /// 验证码
        /// </summary>
        [Display(Name = "验证码")]
        public string ValidateCode { get; set; }

        /// <summary>
        /// 擅长项目Id列表
        /// </summary>
        public List<Guid> Products { get; set; } = new List<Guid>();

        /// <summary>
        /// 擅长设计工具Id列表
        /// </summary>
        public List<Guid> Tools { get; set; }

        /// <summary>
        /// 擅长设计工具其它名称，可空
        /// </summary>
        public string ToolName { get; set; }
    }
}
